package com.santu.edu.supporter.biz.buildings.pojo.po;

import java.io.Serializable;
import java.util.Date;

import com.santu.edu.supporter.biz.buildings.pojo.dto.BuildingsDTO;
import com.santu.edu.supporter.biz.buildings.pojo.enums.BuildingsType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 
 * @TableName edu_supporter_user_buildings
 */
@Data
@Accessors(chain = true)
public class BuildingsPO implements Serializable {
    /**
     * 
     */
    private Long id;

    /**
     * 学校id
     */
    private String schoolId;

    /**
     * 楼栋id
     */
    private String buildingsId;

    /**
     * 楼栋地址
     */
    private String buildingsName;

    /**
     * 楼栋类型
     */
    private Integer type;

    /**
     * 
     */
    private String gmtCreate;

    /**
     * 
     */
    private String gmtModified;

    private static final long serialVersionUID = 1L;


    public static BuildingsPO createItem(BuildingsDTO dto) {
        return new BuildingsPO()
                .setSchoolId(dto.getSchoolId())
                .setBuildingsId(dto.getBuildingsId())
                .setBuildingsName(dto.getBuildingsName())
                .setType(dto.getType().getCode());
    }
}